require File.dirname(__FILE__)+"/../test_helper"
require "starframe"
require "starframe/image"

class TestStarFrameImage < Test::Unit::TestCase
  def test_load
    StarFrame::Image.load(File.dirname(__FILE__)+"/../app/images")
    
    assert_instance_of StarRuby::Texture, StarFrame::Image::Star
    assert_instance_of Module,            StarFrame::Image::Dir
    assert_instance_of StarRuby::Texture, StarFrame::Image::Dir::Star
    
    assert_equal File.dirname(__FILE__)+"/../app/images/star.png",     StarFrame::Image::Star.path
    assert_equal File.dirname(__FILE__)+"/../app/images/dir/star.png", StarFrame::Image::Dir::Star.path
  end
end
